home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / arvis1 / traininp.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1997-08-09  |  7.4 KB  |  227 lines

  1. VERSION 5.00
  2. Begin VB.Form InputWindow2 
  3.    BorderStyle     =   1  'Fixed Single
  4.    Caption         =   "You Have Beaten The Best Time!"
  5.    ClientHeight    =   3165
  6.    ClientLeft      =   45
  7.    ClientTop       =   330
  8.    ClientWidth     =   4590
  9.    ClipControls    =   0   'False
  10.    ControlBox      =   0   'False
  11.    BeginProperty Font 
  12.       Name            =   "Times New Roman"
  13.       Size            =   8.25
  14.       Charset         =   0
  15.       Weight          =   400
  16.       Underline       =   0   'False
  17.       Italic          =   0   'False
  18.       Strikethrough   =   0   'False
  19.    EndProperty
  20.    LinkTopic       =   "Form1"
  21.    MaxButton       =   0   'False
  22.    MinButton       =   0   'False
  23.    Moveable        =   0   'False
  24.    ScaleHeight     =   3165
  25.    ScaleWidth      =   4590
  26.    StartUpPosition =   2  'CenterScreen
  27.    Begin VB.TextBox NewName 
  28.       BeginProperty Font 
  29.          Name            =   "MS Sans Serif"
  30.          Size            =   8.25
  31.          Charset         =   0
  32.          Weight          =   400
  33.          Underline       =   0   'False
  34.          Italic          =   0   'False
  35.          Strikethrough   =   0   'False
  36.       EndProperty
  37.       Height          =   330
  38.       Left            =   90
  39.       TabIndex        =   0
  40.       Top             =   2205
  41.       Width           =   4380
  42.    End
  43.    Begin VB.Label Title 
  44.       Alignment       =   2  'Center
  45.       BackStyle       =   0  'Transparent
  46.       Caption         =   "You Have Betten The High Time For Quad-Ball !"
  47.       BeginProperty Font 
  48.          Name            =   "Times New Roman"
  49.          Size            =   24
  50.          Charset         =   0
  51.          Weight          =   700
  52.          Underline       =   0   'False
  53.          Italic          =   0   'False
  54.          Strikethrough   =   0   'False
  55.       EndProperty
  56.       ForeColor       =   &H0000FFFF&
  57.       Height          =   1635
  58.       Left            =   0
  59.       TabIndex        =   4
  60.       Top             =   0
  61.       Width           =   4515
  62.    End
  63.    Begin VB.Label Label2 
  64.       BackStyle       =   0  'Transparent
  65.       Caption         =   "Enter Your Name:"
  66.       BeginProperty Font 
  67.          Name            =   "Times New Roman"
  68.          Size            =   9.75
  69.          Charset         =   0
  70.          Weight          =   700
  71.          Underline       =   0   'False
  72.          Italic          =   0   'False
  73.          Strikethrough   =   0   'False
  74.       EndProperty
  75.       ForeColor       =   &H00FFFF00&
  76.       Height          =   240
  77.       Left            =   90
  78.       TabIndex        =   3
  79.       Top             =   1890
  80.       Width           =   1500
  81.    End
  82.    Begin VB.Label Label3 
  83.       Alignment       =   2  'Center
  84.       AutoSize        =   -1  'True
  85.       BackStyle       =   0  'Transparent
  86.       Caption         =   "OK"
  87.       BeginProperty Font 
  88.          Name            =   "Times New Roman"
  89.          Size            =   20.25
  90.          Charset         =   0
  91.          Weight          =   400
  92.          Underline       =   0   'False
  93.          Italic          =   0   'False
  94.          Strikethrough   =   0   'False
  95.       EndProperty
  96.       ForeColor       =   &H00008000&
  97.       Height          =   465
  98.       Left            =   660
  99.       TabIndex        =   2
  100.       Top             =   2655
  101.       Width           =   585
  102.    End
  103.    Begin VB.Label Label4 
  104.       Alignment       =   2  'Center
  105.       AutoSize        =   -1  'True
  106.       BackStyle       =   0  'Transparent
  107.       Caption         =   "Cancel"
  108.       BeginProperty Font 
  109.          Name            =   "Times New Roman"
  110.          Size            =   20.25
  111.          Charset         =   0
  112.          Weight          =   400
  113.          Underline       =   0   'False
  114.          Italic          =   0   'False
  115.          Strikethrough   =   0   'False
  116.       EndProperty
  117.       ForeColor       =   &H00008000&
  118.       Height          =   465
  119.       Left            =   2745
  120.       TabIndex        =   1
  121.       Top             =   2655
  122.       Width           =   1155
  123.    End
  124. Attribute VB_Name = "InputWindow2"
  125. Attribute VB_GlobalNameSpace = False
  126. Attribute VB_Creatable = False
  127. Attribute VB_PredeclaredId = True
  128. Attribute VB_Exposed = False
  129. 'This Form Is Like The "INPUTWINDOW" but Is Used For High Time Scores '
  130. '_____________________________________________________________________'
  131. Private Sub Form_Load()
  132.  InputLoaded = True
  133.  Call Set_Mouse_X_Y(Me.Left / Screen.TwipsPerPixelX + 100, Me.Top / Screen.TwipsPerPixelY + 100)
  134.  Exit2Mouse = False
  135.  Me.Picture = ParentForm.StatBox.Picture
  136.  Me.Show
  137.  Me.Refresh
  138.  LimitMovement
  139. End Sub
  140. Private Sub LimitMovement()
  141.   If Exit2Mouse = True Then GoTo nd:
  142.   Me.ZOrder 0
  143.   DoEvents
  144.   KeepMouseOnForm
  145.  Loop Until Exit2Mouse = True
  146. Unload Me
  147. End Sub
  148. Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
  149.  InputLoaded = False
  150.  Exit2Mouse = True
  151. End Sub
  152. Private Sub Form_Unload(Cancel As Integer)
  153.  InputLoaded = False
  154. End Sub
  155. Private Sub Label3_Click()
  156.  Call SaveTimeTraining(NewName.Text, ParentForm.AllTime.Caption)
  157.  Unload Me
  158. End Sub
  159. Private Sub Label3_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  160.  If Label3.Tag = "yes" Then Exit Sub
  161.  Label3.Tag = "yes"
  162.  If Label4.Tag = " yes" Then
  163.   Label4.ForeColor = RGB(0, 90, 0)
  164.   Label4.Top = Label4.Top + 50
  165.   Label4.FontSize = Label4.FontSize - 5
  166.   Label4.Tag = "no"
  167.  End If
  168.  WAVPlay "click.qbs"
  169.  Label3.Top = Label3.Top - 50
  170.  Label3.ForeColor = RGB(0, 255, 0)
  171.  Label3.FontSize = Label3.FontSize + 5
  172.  End Sub
  173. Private Sub Label4_Click()
  174.  Dim Result As VbMsgBoxResult
  175.  Result = MsgBox("Are You Sure?, If You Click OK Your New Top Score Will not Be Saved!", vbOKCancel, "Confirmation")
  176.  If Result = vbCancel Then
  177.   Exit Sub
  178.  Else
  179.   Exit2Mouse = True
  180.   Unload Me
  181.  End If
  182. End Sub
  183. Private Sub Label4_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  184.  If Label4.Tag = "yes" Then Exit Sub
  185.  Label4.Tag = "yes"
  186.  If Label3.Tag = " yes" Then
  187.   Label3.ForeColor = RGB(0, 90, 0)
  188.   Label3.Top = Label3.Top + 50
  189.   Label3.FontSize = Label3.FontSize - 5
  190.   Label3.Tag = "no"
  191.  End If
  192.  WAVPlay "click.qbs"
  193.  Label4.ForeColor = RGB(0, 255, 0)
  194.  Label4.Top = Label4.Top - 50
  195.  Label4.FontSize = Label4.FontSize + 5
  196.  End Sub
  197. Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  198.  If Label4.Tag = "yes" Then
  199.   Label4.ForeColor = RGB(0, 90, 0)
  200.   Label4.Top = Label4.Top + 50
  201.   Label4.FontSize = Label4.FontSize - 5
  202.   Label4.Tag = "no"
  203.  End If
  204.  If Label3.Tag = "yes" Then
  205.   Label3.ForeColor = RGB(0, 90, 0)
  206.   Label3.Top = Label3.Top + 50
  207.   Label3.FontSize = Label3.FontSize - 5
  208.   Label3.Tag = "no"
  209.  End If
  210.  Label4.ForeColor = RGB(0, 90, 0)
  211.  Label3.ForeColor = RGB(0, 90, 0)
  212. End Sub
  213. Private Sub KeepMouseOnForm()
  214. If Exit2Mouse = True Then GoTo nd:
  215. Me.ZOrder 0
  216. If Get_Mouse_X >= Int((Me.Left + Me.Width) _
  217.  / Screen.TwipsPerPixelX) - 5 Then _
  218.  Set_Mouse_X ((Me.Left + Me.Width) / Screen.TwipsPerPixelX) - 5
  219. If Get_Mouse_X <= Int((Me.Left) _
  220.  / Screen.TwipsPerPixelX) Then _
  221.  Set_Mouse_X ((Me.Left) / Screen.TwipsPerPixelX) + 5
  222. If Get_Mouse_Y <= Int(Me.Top / Screen.TwipsPerPixelY) + 5 Then _
  223.  Set_Mouse_Y (Me.Top / Screen.TwipsPerPixelY) + 5
  224. If Get_Mouse_Y >= Int((Me.Top + Me.Height) / Screen.TwipsPerPixelY) - 5 Then _
  225.  Set_Mouse_Y ((Me.Top + Me.Height) / Screen.TwipsPerPixelY) - 5
  226. End Sub
  227.